import { homeAPI, DisplayQueue, DisplayQueueMember } from './hp_data.js';

export const VNS_callback = function (btn, btn_queue) {
    
}

const EL_KW_LIST = [];
export const EL_callback = function (btn, btn_queue) {
    let btn_kw_str = btn.querySelector(".filter-btn-text").innerText;
    if(btn.classList.contains("active")) {
        btn.classList.remove("active");
        console.log(`EL button\: \"${btn_kw_str}\" was filtered out.`);
        EL_KW_LIST.push(btn_kw_str);
    } else {
        btn.classList.add("active");
        console.log(`EL button\: \"${btn_kw_str}\" was reactivated.`);
        EL_KW_LIST.splice(EL_KW_LIST.indexOf(btn_kw_str), 1);
    }

    // console.log(EL_KW_LIST);
    let result;
    console.log(result = homeAPI(EL_KW_LIST, false, true).print());
}

// card_display_nodeList.forEach((node, i, nodeList) => {
//     node.querySelector(".card-deck").innerHTML = "";
//     card_display_node.appendChild(node);
// });

// card_single_subList.forEach((card_subject, i, subList) => {
//     let card_deck_selector = `#${card_subject._get_aim_deck()} > .card-deck`;
//     let aim_card_deck = document.querySelector(card_deck_selector);
//     card_subject.appendTo(aim_card_deck);
// });

// create display
const create_display = function (display_queue = new DisplayQueue("new display set")) {
    
}